#ifndef FKOBJECTSDATA_H
#define FKOBJECTSDATA_H

#include <QMetaType>
#include <QSet>
#include <QList>
#include <QVector>

#include "fkobjects_global.h"

class FKObject;

class FKOBJECTSSHARED_EXPORT FKObjectsData{
public:
    FKObjectsData();
    ~FKObjectsData(){}
    FKObjectsData(const FKObjectsData &other);
    FKObjectsData(QSet<FKObject*> objects);
    bool getNext(QString &className, qint32 &roomIndex, qint32 &id);
    QList<qint32> roomList();

private:
    static int sInit;
    static int declareFKMetaType();
    QList<qint32> _roomList;
    QVector<qint32> _indexes;
    QVector<qint32> _objects;
    QVector<QString> _classNames;
    void resetIterators();
    QVectorIterator<qint32> _indexIterator;
    QVectorIterator<qint32> _objectsIterator;
    QVectorIterator<QString> _classnameIterator;

    friend QDataStream& operator<<(QDataStream& stream,const FKObjectsData &data);
    friend QDataStream& operator>>(QDataStream& stream, FKObjectsData &data);
};
Q_DECLARE_METATYPE(FKObjectsData)
//typedef QList<qint32> QList<qint32>;
Q_DECLARE_METATYPE(QList<qint32>)

QDataStream& operator<<(QDataStream& stream,const QList<qint32> &data);
QDataStream& operator>>(QDataStream& stream, QList<qint32> &data);

#endif // FKOBJECTSDATA_H
